﻿


/*========================================================================================
//Goodasong -- MySnake
//创建者: 郑雪松
//创建时间：2013年8月24日
//类描述：实体类 FrmLoginlog (属性说明自动提取数据库字段的描述信息)
//最后修改者:郑雪松
//最后修改时间:2013年8月24日	
=========================================================================================*/
using System;
using System.Web;
using System.Runtime.Serialization;

namespace COM.Rights.Model
{
    /// <summary>
    /// 实体类 FrmLoginlog (属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]	  
    [Model(Name = "FrmLoginlog", PrimaryKey = "GID", ModelType = ModelType.Table, Condition = "1=1", IsNeedRecordModify = true)]
    public partial class FrmLoginlogInfo : BaseModel
    {
        public FrmLoginlogInfo()
        {            
            PrimaryKey = "GID"; 
			Fields.Add("GID");//GID
			Fields.Add("Account");//账号
			Fields.Add("IP");//IP
			Fields.Add("LoginDate");//操作时间
			Fields.Add("HostName");//系统地址
			Fields.Add("Action");//操作方式
			
			
			CanNotNullFields.Add("GID");//GID不能为空!				
			this.OnCreated();			
			this.OnModelCreated();
        }
		public FrmLoginlogInfo(bool isNewInfo):this()
        {
			IsNew = isNewInfo;
		}
		#region 方法

        public void OnCreated() { this.SetPrimaryKeyValue(); }		

		public override void SetPrimaryKeyValue()
        {
			
            GID = Guid.NewGuid();
        }
        #endregion 
		
		#region 成员变量
				
		private Guid _GID;//GID
		private string _Account;//账号
		private string _IP;//IP
		private DateTime _LoginDate;//操作时间
		private string _HostName;//系统地址
		private string _Action;//操作方式
		
		#endregion
		
		#region 属性 
		
		/// <summary>
        /// GID
        /// </summary>       
		[ModelField(Description = "GID", Type = typeof(Guid), ErrorMessage = "GID信息错误!", FieldType = FieldType.Normal, IsKeyField = true,IsUnique = true, IsForeignKey = false, IsAllowNull = false, IsDbGenerated = false, Size = 16,  DbType = "uniqueidentifier", IsNeedRecordModify = true)]
        public virtual Guid GID
        {
            get
            {
                return this._GID;
            }
            set
            {
                if (_GID != value || (_GID == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "GID", _GID, value, "uniqueidentifier", "GID");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnGIDChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._GID = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnGIDChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _GID = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 账号
        /// </summary>       
		[ModelField(Description = "账号", Type = typeof(string), ErrorMessage = "账号信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 100,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Account
        {
            get
            {
                return this._Account;
            }
            set
            {
                if (_Account != value || (_Account == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "Account", _Account, value, "varchar", "账号");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnAccountChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Account = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnAccountChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Account = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// IP
        /// </summary>       
		[ModelField(Description = "IP", Type = typeof(string), ErrorMessage = "IP信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string IP
        {
            get
            {
                return this._IP;
            }
            set
            {
                if (_IP != value || (_IP == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "IP", _IP, value, "varchar", "IP");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnIPChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._IP = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnIPChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _IP = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 操作时间
        /// </summary>       
		[ModelField(Description = "操作时间", Type = typeof(DateTime), ErrorMessage = "操作时间信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 8,  DbType = "datetime", IsNeedRecordModify = true)]
        public virtual DateTime LoginDate
        {
            get
            {
                return this._LoginDate;
            }
            set
            {
                if (_LoginDate != value || (_LoginDate == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "LoginDate", _LoginDate, value, "datetime", "操作时间");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnLoginDateChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._LoginDate = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnLoginDateChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _LoginDate = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 系统地址
        /// </summary>       
		[ModelField(Description = "系统地址", Type = typeof(string), ErrorMessage = "系统地址信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 100,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string HostName
        {
            get
            {
                return this._HostName;
            }
            set
            {
                if (_HostName != value || (_HostName == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "HostName", _HostName, value, "varchar", "系统地址");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnHostNameChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._HostName = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnHostNameChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _HostName = value;
                    }
                }
            }
        }
		
		/// <summary>
        /// 操作方式
        /// </summary>       
		[ModelField(Description = "操作方式", Type = typeof(string), ErrorMessage = "操作方式信息错误!", FieldType = FieldType.Normal, IsKeyField = false,IsUnique = false, IsForeignKey = false, IsAllowNull = true, IsDbGenerated = false, Size = 50,  DbType = "varchar", IsNeedRecordModify = true)]
        public virtual string Action
        {
            get
            {
                return this._Action;
            }
            set
            {
                if (_Action != value || (_Action == null && value == null))
                {
                    if (!IsGetDataFromDB)
                    {
                        ModifyInfo modifyInfo = new ModifyInfo("FrmLoginlog", "Action", _Action, value, "varchar", "操作方式");   
                        this.OnPropertyChanging(modifyInfo);
                        this.OnActionChanging(modifyInfo);
                        this.SendPropertyChanging(modifyInfo);

                        this._Action = value;

                        this.OnPropertyChanged(modifyInfo);
                        this.OnActionChanged(modifyInfo);
                        this.SendPropertyChanged(modifyInfo);      
                    }
                    else
                    {
                        _Action = value;
                    }
                }
            }
        }
		#endregion 属性
				  
		#region 属性更改事件
		
		partial void OnGIDChanging(ModifyInfo modifyInfo);//GIDGID改变之前发生
        partial void OnGIDChanged(ModifyInfo modifyInfo);//GIDGID改变之后发生
		partial void OnAccountChanging(ModifyInfo modifyInfo);//账号Account改变之前发生
        partial void OnAccountChanged(ModifyInfo modifyInfo);//账号Account改变之后发生
		partial void OnIPChanging(ModifyInfo modifyInfo);//IPIP改变之前发生
        partial void OnIPChanged(ModifyInfo modifyInfo);//IPIP改变之后发生
		partial void OnLoginDateChanging(ModifyInfo modifyInfo);//操作时间LoginDate改变之前发生
        partial void OnLoginDateChanged(ModifyInfo modifyInfo);//操作时间LoginDate改变之后发生
		partial void OnHostNameChanging(ModifyInfo modifyInfo);//系统地址HostName改变之前发生
        partial void OnHostNameChanged(ModifyInfo modifyInfo);//系统地址HostName改变之后发生
		partial void OnActionChanging(ModifyInfo modifyInfo);//操作方式Action改变之前发生
        partial void OnActionChanged(ModifyInfo modifyInfo);//操作方式Action改变之后发生
		
		#endregion		
		public virtual string DetailURI { get; set; }
        public virtual string DetailHTMLURI { get; set; }
		public virtual string ManageEditURI {get; set;}
		public virtual string ManageDetailURI {get; set;}
		public override void OnLoaded()
        {
            base.OnLoaded();	
			DetailURI = ZModel.InitDetailURI("FrmLoginlog", "GID", GID);
            DetailHTMLURI = ZModel.InitDetailHTMLURI("FrmLoginlog", "GID", GID);		
			ManageEditURI = ZModel.InitMEditURI("FrmLoginlog", "GID", GID);	
		 	ManageDetailURI = ZModel.InitMDetailURI("FrmLoginlog", "GID", GID);	
			OnModelLoaded();
        }
		
		partial void OnModelCreated();
        partial void OnModelLoaded();
	}	
}